/**
 * 
 */
package com.swg.cocobox.filetransfer.internal;

import java.nio.charset.Charset;

import com.swg.cocobox.filetransfer.command.ClientCommand;

/**
 * @author satriaprayoga
 *
 */
public final class UTFCommandBuilder implements ClientCommandBuilder{

	@Override
	public ClientCommand buildCommand(String code, String message) {
		if(code==null || code.trim().isEmpty()){
			throw new IllegalArgumentException("code is mandatory");
		}
		ClientCommand command=new ClientCommandImpl(Charset.forName("UTF-8"), code, message);
		return command;
	}

}
